package iface;


import common.Point;

public interface PublicSharesIface {

	/**
	 * Get list of published shares of a given temporary ID
	 * @param clientID - temporary client ID
	 * @return - List of points which represent this client's shares.
	 * NULL if list is empty or invalid ID
	 */
	public Point[] getPublicShareList(Integer clientID);
	
	/**
	 * Request a list of clients that have at least a single share published
	 * @return list of client IDs
	 */
	public Integer[] getListOfClients();
	
	/**
	 * Publish a client share
	 * @param clienID - client's ID
	 * @param cliShare - the share to publish
	 * @return true iff successful
	 */
	public Boolean submitClientShare(Integer clientID, Point cliShare);
	
	/**
	 * Does a certain client has enough published shares in order to interpolate
	 * his secret from those shares.
	 * @return true iff has Seetings.thershold shares published
	 */
	public Boolean hasEnoughShares(Integer clientID);
	
	/**
	 * Interpolate and return user's secret (must have enough shares)
	 * @param clientID
	 * @return user's secret if hasEnoughShares, or NULL otherwise.
	 */
	public Integer getUserSecret(Integer clientID); 
}
